import request from '@/config/axios'

export interface GoodsSkuVO {
  id: number
  goodId: number
  skuName: string
  status: byte
  createTime: Date
  sort: number
  updateTime: Date
  creator: string
  updater: string
}

// 查询产品sku管理列表
export const getGoodsSkuPage = async (params) => {
  return await request.get({ url: `/cms/goods-sku/page`, params })
}

// 查询产品sku管理详情
export const getGoodsSku = async (id: number) => {
  return await request.get({ url: `/cms/goods-sku/get?id=` + id })
}

// 新增产品sku管理
export const createGoodsSku = async (data: GoodsSkuVO) => {
  return await request.post({ url: `/cms/goods-sku/create`, data })
}

// 修改产品sku管理
export const updateGoodsSku = async (data: GoodsSkuVO) => {
  return await request.put({ url: `/cms/goods-sku/update`, data })
}

// 删除产品sku管理
export const deleteGoodsSku = async (id: number) => {
  return await request.delete({ url: `/cms/goods-sku/delete?id=` + id })
}

// 导出产品sku管理 Excel
export const exportGoodsSku = async (params) => {
  return await request.download({ url: `/cms/goods-sku/export-excel`, params })
}
